<template>
	<view>
		<view class="" style="position: fixed; width: 100%; display: flex; align-items: flex-end; height: 150rpx; background: #fff;">
			<image @click="toReturn" style="width: 50rpx; height: 50rpx; margin-left: 15rpx;" src="../../../static/images/goBack.png">
			</image>
			<text>{{listName}}</text>
		</view>
		<!-- 详情 -->
		<view class="" style="width: 100%;min-height: 100vh; background: #f8f8f8; padding-top: 130rpx;">
		
		
			<view class="" style="width: 90%; margin: auto;background: #fff;">
				<view class="" style="display: flex; width: 90%; margin: auto;">
					<view class="">
						<view class="" v-for="(item ,index) in dataList" @click="toDetails(item)"
							style="display: flex; align-items: center;width: 90%; margin:20rpx auto 0 auto;">
							<view class="">
								  <img style="width: 150rpx; height:150rpx" :src="`${yourBaseURL}${item.mian_image}`" alt="">
							</view>
							<view class="" style="font-size: 20rpx; margin-left: 20rpx;">
								<p style="font-size: 35rpx; font-weight: 600;">{{item.title}}</p>
								<view style="padding: 10rpx 0;">
									<span>主角：</span>
									<span>{{item.lead}}</span>
								</view>
								<view style="height: 60rpx; overflow: hidden; ">
									<span
										style="line-height: 30rpx; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; text-overflow: ellipsis;">
										简介:{{item.jie}}
									</span>
								</view>
								<view style="padding: 10rpx 0;">
									<span style="color: #d06764;" v-if="item.renew==1">已完结</span>
									<span style="color: #d06764;" v-if="item.renew==0">连载中</span> <span>·{{item.lead}}</span>
								</view>
							</view>
						</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		getMyMoreList
	} from '@/http/api.js'
	export default {
		data() {
			return {
				listId: '',
				listName: '',
				dataList:[],
				yourBaseURL: 'http://hyxs.ychlkj.cn',
			};
		},
		onLoad(e) {
			this.listId = e.id
			this.listName = e.name
			console.log(e, "[][][");
			this.MyMoreList()
		},
		methods: {
			toDetails(item){
				console.log(item,"详情");
				uni.navigateTo({
				
					 url: '../../books/details/details?id='+ item.id
					// url: '../books/books1/books1?id=' + e
				});
				//详情
			},
			// 返回上一页
			toReturn() {
				uni.navigateBack();
			},
			MyMoreList() {
				let data = {
					"bookclass_id": this.listId
				}
				getMyMoreList(data).then((res) => {
					if(res[1].data.code ==1){
					this.dataList =res[1].data.data
					}
					console.log(res[1].data, "查看更多");
				})
			}
		}

	}
</script>

<style lang="scss">

</style>